package com.youkeyi.ddy.cloud.common.api.application.business.crm.config;

import com.youkeyi.ddy.cloud.common.api.application.business.crm.config.dto.BusinessCustomerConfigListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.config.param.BusinessCustomerConfigListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.config.param.BusinessCustomerConfigUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统配置
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】customer config"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessCustomerConfigCloudServiceFallback.class)
@RequestMapping("/business/customer/config")
public interface BusinessCustomerConfigCloudService {

    // 查询配置列表
    @ApiOperation(value = "Query System CustomerConfig List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.config.BusinessCustomerConfigCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessCustomerConfigListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System CustomerConfig List", dataType = "BusinessCustomerConfigListCloudParam", dataTypeClass = BusinessCustomerConfigListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessCustomerConfigListCloudDto list(BusinessCustomerConfigListCloudParam param);


    // 编辑配置
    @ApiOperation(value = "Update System Corp", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.config.BusinessCustomerConfigCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update System Corp", dataType = "BusinessCustomerConfigUpdateCloudParam", dataTypeClass = BusinessCustomerConfigUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessCustomerConfigUpdateCloudParam param);

}
